<style>
.fly-home {
  background-size: cover;
  background-repeat: no-repeat;
}
</style>
{if condition="empty($person)"}
  <div class="fly-home fly-panel" style="background-image: url({$LoginUser['cover_cdn']});">
    <img src="{$LoginUser['avatar_cdn']}" alt="{$LoginUser['nickname']}">
    {if condition="$LoginUser['auth'] == 1"}
      <i class="iconfont icon-renzheng" title="Fly社区认证"></i>
    {/if}
    <h1>
      {$LoginUser['nickname']}
      {if condition="$LoginUser['sex'] == 1"}
      <i class="iconfont icon-nan"></i>
      {elseif condition="$LoginUser['sex'] == 2"}
      <i class="iconfont icon-nv"></i>
      {else /}
      <span>{$LoginUser['sex_text']}</span>
      {/if}
      <i class="layui-badge fly-badge-vip">VIP {$LoginUser['vip']}</i>
      <!--
      <span style="color:#c00;">（管理员）</span>
      <span style="color:#5FB878;">（社区之光）</span>
      <span>（该号已被封）</span>
      -->
    </h1>
    {if condition="$LoginUser['auth'] == 1"}
    <p style="padding: 10px 0; color: #5FB878;">认证信息：{$LoginUser['nickname']}</p>
    {else}
    <p style="color:#c00;">（未认证）</p>
    {/if}
    <p class="fly-home-info">
      <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">{$LoginUser['point']} 积分</span>
      <i class="iconfont icon-shijian"></i><span>{$LoginUser['createtime']} 加入</span>
      <i class="iconfont icon-chengshi"></i><span>
        {if condition="$LoginUser.province"}
        {$LoginUser.provinces.name}-{$LoginUser.citys.name}-{$LoginUser.districts.name}
        {else /}
        保密
        {/if}
      </span>
    </p>
    <p class="fly-home-sign">（{$LoginUser.content ? $LoginUser.content : '这个人太懒，什么都没留下'}）</p>
  </div>
  <div class="layui-container">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md6 fly-home-jie">
        <div class="fly-panel">
          <h3 class="fly-panel-title">{$LoginUser['nickname']} 最近的提问</h3>
          <ul class="jie-row">
            {if condition="empty($UserPost)"}
            <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i
                style="font-size:14px;">没有发表任何求解</i></div>
            {else}
            {foreach $UserPost as $item}
            <li>
              {if condition="$item['state'] == 2"}
              <span class="fly-jing">精</span>
              {/if}
              <a href="" class="jie-title"> {$item['content']}</a>
              <i>{$item['createtime']}</i>
              <em class="layui-hide-xs">{$item['visit']}阅/27答</em>
            </li>
            {/foreach}
            {/if}
          </ul>
        </div>
      </div>
  
      <div class="layui-col-md6 fly-home-da">
        <div class="fly-panel">
          <h3 class="fly-panel-title">{$LoginUser['nickname']} 最近的回答</h3>
          <ul class="home-jieda">
            {if condition="empty($UserComment)"}
            <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div>
            {else}
              {foreach $UserComment as $item}
            <li>
              <p>
                <span>{$item['createtime']}</span>
                在<a href="" target="_blank">{$item.post.title}</a>中回答：
              </p>
              <div class="home-dacontent">
                {$item['content']}
              </div>
            </li>
            {/foreach}
            {/if}
  
          </ul>
        </div>
      </div>
    </div>
  </div>

    <!-- person -->
  {else}
    <div class="fly-home fly-panel" style="background-image: url({$LoginUser['cover_cdn']});">
    <img src="{$person['avatar_cdn']}" alt="{$person['nickname']}">
    {if condition="$person['auth'] == 1"}
      <i class="iconfont icon-renzheng" title="Fly社区认证"></i>
    {/if}
    <h1>
      {$person['nickname']}
      {if condition="$person['sex'] == 1"}
      <i class="iconfont icon-nan"></i>
      {elseif condition="$person['sex'] == 2"}
      <i class="iconfont icon-nv"></i>
      {else /}
      <span>{$person['sex_text']}</span>
      {/if}
      <i class="layui-badge fly-badge-vip">VIP {$person['vip']}</i>
      <!--
      <span style="color:#c00;">（管理员）</span>
      <span style="color:#5FB878;">（社区之光）</span>
      <span>（该号已被封）</span>
      -->
    </h1>
    {if condition="$person['auth'] == 1"}
    <p style="padding: 10px 0; color: #5FB878;">认证信息：{$person['nickname']}</p>
    {else}
    <p style="color:#c00;">（未认证）</p>
    {/if}
    <p class="fly-home-info">
      <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">{$person['point']} 积分</span>
      <i class="iconfont icon-shijian"></i><span>{$person['createtime']} 加入</span>
      <i class="iconfont icon-chengshi"></i><span>
        {if condition="$person.province"}
        <!-- {$person.provinces.name}-{$person.citys.name}-{$person.districts.name} -->
          {$LoginUser.region_text}
        {else /}
        保密
        {/if}
      </span>
    </p>
    <p class="fly-home-sign">（{$person.content ? $person.content : '这个人太懒，什么都没留下'}）</p>
    <!-- <div class="fly-sns" data-user="">
      <a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>
      <a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>
    </div> -->
  </div>
  <div class="layui-container">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md6 fly-home-jie">
        <div class="fly-panel">
          <h3 class="fly-panel-title">{$person['nickname']} 最近的提问</h3>
          <ul class="jie-row">
            {if condition="empty($PersonPost)"}
            <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i
                style="font-size:14px;">没有发表任何求解</i></div>
            {else}
            {foreach $PersonPost as $item}
            <li>
              {if condition="$item['state'] == 2"}
              <span class="fly-jing">精</span>
              {/if}
              <a href="" class="jie-title"> {$item['content']}</a>
              <i>{$item['createtime']}</i>
              <em class="layui-hide-xs">{$item.visit_count}阅/{$item.comment_count}答</em>
            </li>
            {/foreach}
            {/if}
          </ul>
        </div>
      </div>
  
      <div class="layui-col-md6 fly-home-da">
        <div class="fly-panel">
          <h3 class="fly-panel-title">{$person['nickname']} 最近的回答</h3>
          <ul class="home-jieda">
            {if condition="empty($PersonComment)"}
            <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div>
            {else}
              {foreach $PersonComment as $item}
            <li>
              <p>
                <span>{$item['createtime']}</span>
                在<a href="" target="_blank">{$item.post.title}</a>中回答：
              </p>
              <div class="home-dacontent">
                {$item['content']}
              </div>
            </li>
            {/foreach}
            {/if}
          </ul>
        </div>
      </div>
    </div>
  </div>
  {/if}
